package com.dudu.service.impl;

import java.util.List;

import net.sf.json.JSONObject;

import com.dudu.bean.DictionaryBean;
import com.dudu.dao.DictionaryDao;
import com.dudu.service.IDictionaryService;

import core.CoreDao;
import core.CoreDaoInvoke;
/**
 * 字典表service
 * @author qinfx
 *
 */
public class DictionaryServiceImpl implements IDictionaryService {
	private CoreDao coreDao = CoreDaoInvoke.getInstance();
	private DictionaryDao dictionaryDao = new DictionaryDao();
	
	/**
	 * 查询全部
	 * @return
	 */
	public List<JSONObject> queryAll() {
		return dictionaryDao.queryAll(coreDao);
	}
	/**
	 * 新增
	 * @param bean
	 * @return
	 */
	public int insertDictionary(DictionaryBean bean){
		return dictionaryDao.insert(coreDao, bean);
	}
	/**
	 * 更新菜单
	 * @param bean
	 * @return
	 */
	public int updateDictionary(DictionaryBean bean){
		return dictionaryDao.update(coreDao, bean);
	}
	
}
